package com.mapper;

import com.pojo.Orders;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author lenove
 @@ -22,5 +27,8 @@ public interface OrdersMapper {

 int updateByPrimaryKey(Orders record);

 @Select("SELECT * FROM tb_orders WHERE user_id = #{id}")
 @Results({@Result(id = true, column = "id", property = "id"),@Result(column = "number",property ="number")})
 List<Orders> selectOrdersByUserId(int user_id);

 }